//
//  ViewControllerCVC.swift
//  CooperSwift_Example
//
//  Created by 计海峰 on 2021/11/25.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import UIKit
import CooperSwift

class ViewControllerCVC: UICollectionViewCell {

    @IBOutlet weak var titleLB: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        self.contentView.addBorder(color: .lightGray, layerRect: CGRect(0, 65, Screen.width/4.0, 1)) /// 下
        self.contentView.addBorder(color: .lightGray, layerRect: CGRect(Screen.width/4.0 - 1, 0, 1, 66)) /// 右
//        self.contentView.addCorner(.init(topLeft: 0, topRight: 0, bottomLeft: 0, bottomRight: 8))
        
//        self.contentView.backgroundColor = .random()
        self.contentView.addCorner(.init(topLeft: 8, topRight: 8, bottomLeft: 8, bottomRight: 8), layerRect: CGRect(0, 0, Screen.width/4.0, 66))
        
    }
    
    override func bindTo(_ info: Any?) {
        super.bindTo(info)
        guard let target = info as? ViewControllerCollectionModel else { return }
        guard let arr = target.model as? (String, String) else { return }
        titleLB.text = arr.0
    }

}
